@use "../mixins" as *;

.toc-wrapper {
  position: relative;
  display: none;
  padding-left: 64px;

  @include respond-to("xxl") {
    display: block;
    padding-right: 32px;
  }

  @include respond-to("max") {
    padding-right: 48px;
  }

  @include respond-to("xxl") {
    display: block;
    padding-right: 32px;
  }

  @include respond-to("max") {
    padding-right: 48px;
  }

  .toc-content {
    position: sticky;
    top: calc(var(--header-height) + 32px);
    width: 200px;
    height: calc(100vh - var(--header-height) - 32px);
    padding-bottom: 30px;
    margin-top: 0;
    margin-bottom: 32px;
    overflow-y: auto;
    scrollbar-width: none;

    &__heading {
      padding-left: 14px;
      margin-top: 0;
      font-size: 12px;
      font-weight: 600;
      line-height: 30px;
      color: var(--text-color-light);
      text-transform: uppercase;
    }

    p {
      overflow: hidden;
      font-size: 11px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  .toc-content-mask {
    position: absolute;
    bottom: 30px;
    z-index: 10;
    width: 200px;
    height: 32px;
    background: linear-gradient(transparent, var(--bg-color) 70%);
  }
}
